<template>
	<view>
		<cu-custom bgColor="bg-blue" :isBack="true"><block slot="content">活动内容</block></cu-custom>
		<view v-if="desc">
			<view class="padding bg-white">
				<view class="news-title text-cut padding-xs">
				{{desc.name}}
				</view>
				<view class="padding-xs">
					<view class="cu-tag bg-blue light sm round">{{desc.remark}}</view>
				</view>
				<view style="clear: both;"></view>
			</view>
			<view class="line"></view>
			<view class="news-content bg-white">
				<u-parse :content="desc.content"></u-parse>
			</view>
		</view>
	</view>
</template>

<script>
  export default {
    data() {
      return {
        desc: null
      }
    },
    methods: {
    },
    onLoad(options) {
		let _this = this;
		uni.request({
			url: _this.$globals.apibase+'/api/Index/activityDesc',
			data: {
				id: options.id
			},
			method: 'POST',
			header: {
				'content-type': 'application/json'
			},
			success: (res) => {
				if(res.data.code == '401'){
					uni.setStorageSync('token', '');
				}
				if(res.data.code == '1'){
					_this.desc = res.data.data.desc;
				}
				if(res.data.code == '0'){
					uni.showToast({
						icon: 'none',
						title: res.data.msg
					});
				}
			}
		});
    }
  }
</script>

<style>
	.fl{
		float: left;
	}
	.fr{
		float: right;
	}
  .news-top {
    padding: 0 30upx 10upx;
  }

  .news-header {
    display: flex;
    height: 100upx;
    line-height: 100upx;
  }

  .news-header .uni-icon {
    text-align: left;
    width: 30px;
    color: #694629 !important;
  }

  .news-header .title {
    flex: 1;
    font-size: 36upx;
    text-align: center;
    color: #694629;
    padding-right: 30upx;
  }

  .news-title {
    font-size: 36upx;
    color: #333;
    font-weight: bold;
  }

  .news-desc {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .news-nav {
    color: #694629;
    border-bottom: 1px solid #694629;
    height: 35upx;
    line-height: 35upx;
  }

  .news-nav .zh {
    font-size: 22upx;
    padding-right: 14upx;
  }

  .news-nav .en {
    font-family: Raavi;
    font-size: 20upx;
  }

  .news-time {
	margin-top: 5%;
	color: #999;
	font-size: 22upx;
	}

  .line {
    background-color: #eee;
    height: 15upx;
  }

  .news-content {
    color: #666;
    font-size: 30upx;
    padding: 10upx 30upx;
	line-height: 50upx;
  }
  
</style>
